<%@ page language="java" contentType="text/html; charset=utf-8"  pageEncoding="utf-8"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<jsp:include page="/common/commonCss.jsp"/>
<jsp:include page="/common/commonJs.jsp"/>
<script src="${basePath}commonJs/jquery.ztree.all.js"></script>
<script language="javascript" src="${basePath}commonJs/tags/My97DatePicker/WdatePicker.js"></script>
<script  type="text/javascript" src="${basePath }commonJs/ajaxfileupload.js"></script>
<script src="${basePath}commonJs/jquery.imageScroller.js"></script>
<title>嘉童游乐中心-新增商品信息</title>
<SCRIPT type="text/javascript">
		var treeNodes=[];
		var resverseType="";
		$(document).ready(function() {
			//getTreeData();
			//$.fn.zTree.init($("#sptree"), setting, treeNodes);
			getData();
		 });
		var setting = {
			data: {
				simpleData: {
					enable: true
				}
			},
			callback:{
				onclick:zTreeOnClick
			}
		};
		//初始化页面修改的数据
		function initData(result){
				$("#prdId").val(result.pkPrdId);
				$("#prdName").val(result.prdName);
				$("#cateName").val(result.cateName);
				$("#comments").val(result.comments);
		}
		function getData(){
			 resverseType=$("#resverseType").val();
			var pkPrdId=$("#pkPrdId").val();
			$.ajax({
				url:"${basePath}scmInvocing/productInfo/findProductById.shtml",
				dataType:"json",
				type:"post",
				data:{"resverseType":resverseType,"pkPrdId":pkPrdId},
  	 			async:true,
  	 			error : function(XMLHttpRequest) {
  	 				ajaxError(XMLHttpRequest);
  	 			},
  	 			success:function(result){
  	 					showData(resverseType,result);
  	 			}
		});
		}
		
		function showData(resverseType,result){
				var html="";
				var cateId2=$("#cateId2").val();
				var entity=result.entity;
				var unit=result.unit;
				trimJson(entity);
				initData(entity);
				$("#dynamic").html(html);
				if(resverseType=="1"){
					html+='<div id="singleTicked">';
            		html+='<dl class="fixed" style="overflow:hidden">';
	            	html+='<dd><label> 儿童数量：</label>';
            		if(entity.chdCnt==0){
    	            	html+='<input type="radio" checked="checked" name="TchdCnt"  value="0">0';
    	            	 html+='<input type="radio"    class="ml10" name="TchdCnt" value="1">1';
            		}else{
    	            	html+='<input type="radio" name="TchdCnt"  value="0">0';
    	                html+='<input type="radio"  checked="checked"  class="ml10" name="TchdCnt" value="1">1';
            		}
	                html+='<font color="#FF0000">*</font></dd></dl>';        
	             	html+='<dl class="fixed" style="overflow:hidden">';
	            	html+='<dd><label>监护人数量：</label>';
	             	html+='<input type="radio"  name="TguaCnt"  value="1" checked="checked"/>1';
	                html+='<font color="#FF0000">*</font> </dd></dl></div>';
				}else if(resverseType=="2"){
					html+='<div id="huijiGoods">';
					html+='<dl class="fixed" style="overflow:hidden">';
					html+='<dd><label>商品周期：</label>';
					if(entity.month==6){
						html+='<input type="radio" checked="checked" name="Tmonth"  value="6">6个月';
						html+='<input type="radio" name="Tmonth" value="12" class="ml10" >12个月';
					}else if(entity.month==12){
						html+='<input type="radio"  name="Tmonth"  value="6">6个月';
						html+='<input type="radio" checked="checked"   name="Tmonth" value="12" class="ml10" >12个月';
					}
					html+='<font color="#FF0000">*</font></dd></dl>';
					html+='<dl class="fixed" style="overflow:hidden">';
					html+=' <dd><label>使用范围：</label>'; 
					if(entity.weekday=="1,2,3,4"){
						html+='<input type="radio" name="Tweekday" value="1,2,3,4" checked="checked">工作日(周一到周四)';
						html+='<input type="radio" name="Tweekday"  class="ml10" value="1,2,3,4,5,6,7">含周末';
					}else{
						html+='<input type="radio" name="Tweekday" value="1,2,3,4" checked="checked">工作日(周一到周四)';
						html+='<input type="radio" name="Tweekday" checked="checked" class="ml10" value="1,2,3,4,5,6,7">含周末';
					}
					html+='<font color="#FF0000">*</font></dd></dl>';
					html+='<dl class="fixed" style="overflow:hidden">';
					html+='<dd><label>监护人数量：</label> ';
					if(entity.guaCnt==1){
						html+='<input type="radio" checked="checked" name="HguaCnt"  value="1"/>1';
						html+='<input type="radio" name="HguaCnt" class="ml10" value="2"/>2';
					}else{
						html+='<input type="radio"  name="HguaCnt"  value="1"/>1';
						html+='<input type="radio"  checked="checked" name="HguaCnt" class="ml10" value="2"/>2';
					}
					html+='<font color="#FF0000">*</font> </dd></dl></div>';
				}else if(resverseType=="3"||resverseType=="4"){
					html+=' <div id="paiOrTeam"><dl class="fixed" style="overflow:hidden">';
					html+='<dd><label>使用范围：</label>';
					if(entity.weekday=="1,2,3,4,5"){
						html+='<input type="radio" name="partWeekday" value="1,2,3,4" checked="checked">工作日(周一到周四)';
						html+='<input type="radio" name="partWeekday" value="1,2,3,4,5,6,7"  class="ml10" >含周末';
					}else{
						html+='<input type="radio" name="partWeekday" value="1,2,3,4" >工作日(周一到周四)';
						html+='<input type="radio" name="partWeekday" value="1,2,3,4,5,6,7"   checked="checked"  class="ml10" >含周末'; 
					}
			        html+='<font color="#FF0000">*</font></dd></dl>';
			        if(resverseType=="3"){
				        html+='<dl class="fixed" style="overflow:hidden;" id="pai">';
				        html+='<dd><label id=""> 派队持续时间：</label> <input type="radio" checked="checked" name="PaiHours"  value="2"/>2小时';
				        html+='<font color="#FF0000">*</font> </dd></dl>';     
			        }else{
			        		 html+='<dl class="fixed" style="overflow:hidden;display:block" id="team">';
					     	html+='<dd><label id=""> 团体持续时间：</label>';
					     	if(entity.hours==4){
					     		html+='<input type="radio" checked="checked" name="TeamHours"  value="4"/>4小时';
						        html+='<input type="radio" name="TeamHours" class="ml10"  value="6"/>6小时';
					     	}else if(entity.hours==6){
						        html+='<input type="radio" name="TeamHours"  class="ml10"  value="4"/>4小时';
						        html+='<input type="radio" name="TeamHours" class="ml10" checked="checked"   value="6"/>6小时';
					     	}else{
					     		html+='<input type="radio" checked="checked" name="TeamHours"  value="4"/>4小时';
						        html+='<input type="radio" name="TeamHours" class="ml10"  value="6"/>6小时';
					     	}
					        html+='<font color="#FF0000">*</font> </dd></dl>';
			        }
			        html+='<dl class="fixed" style="overflow:hidden">';
			        html+='<dd><label>是否含餐：</label> ';
			        if(resverseType=="3"){//派对
					        	html+='<input type="radio" checked="checked" name="isFood"  value="1">是';
			        }else{
			        	 if(entity.incFood=="1"){
					        	html+='<input type="radio" checked="checked" name="isFood"  value="1">是';
					        	html+='<input type="radio" name="isFood" value="0" class="ml10">否';
					        }else{
					        	html+='<input type="radio"  name="isFood"  value="1">是';
					        	html+='<input type="radio"  checked="checked" name="isFood" value="0" class="ml10">否';
					        }
			        }
			        html+='<font color="#FF0000">*</font> </dd></dl></div>';
				}else if(resverseType=="5"){
					var dateFmt="'yyyy/MM/dd HH:mm:00'";
					html+='<div id="activityGoods" >';
				   	html+='<dl class="fixed"  style="overflow:hidden">';
					html+='<dd><label>开始时间：</label>';
		           	html+='<input type="text"   id="startTime"  value="'+entity.startTime+'" class="Wdate iput_t w200"  name="startTime" onclick="WdatePicker({dateFmt:'+dateFmt+',isShowWeek:true,isShowClear:true,readOnly:true})">';
		           	html+='<font color="#FF0000">*</font></dd></dl>';
		          	html+='<dl class="fixed"  style="overflow:hidden">';
		           	html+='<dd><label>结束时间：</label>';
		           	html+='<input type="text" id="endTime" class="Wdate iput_t w200"  value="'+entity.endTime+'"  name="endTime" onclick="WdatePicker({dateFmt:'+dateFmt+',isShowWeek:true,isShowClear:true,readOnly:true})" >';
		           	html+='<font color="#FF0000">*</font></dd></dl></div>';
				}else if(resverseType=="6"||resverseType=="7"||resverseType=="8"||resverseType=="9"||resverseType=="11"
					||resverseType=="12"||resverseType=="13"||resverseType=="61"||resverseType=="61"){
					html+='<div id="unitAndRule"><dl class="fixed" style="overflow:hidden">';
					html+='<dd><label>计量单位：</label>';
					html+='<div class="uboxstyle">';
					var unitHtml="";
					if(cateId2==""){
						unitHtml+='<option selected="selected" floatFlag="1"></option>';
						$(unit).each(function(id,item){
							 unitHtml+='<option value='+item.pkPrdunitId+'  floatFlag="'+item.floatFlag+'">'+item.unitName+'</option>';
						});
					}else{
						$(unit).each(function(id,item){
							if(entity.fkPrdunitId==item.pkPrdunitId){
								unitHtml+='<option value='+item.pkPrdunitId+' selected="selected"  floatFlag="'+item.floatFlag+'">'+item.unitName+'</option>';
							}else{
								unitHtml+='<option value='+item.pkPrdunitId+'  floatFlag="'+item.floatFlag+'">'+item.unitName+'</option>';
							}
						});
					}
					html+='<select  name="unitId" id="unitId">'+unitHtml+'</select>';
					html+='</div><font color="#FF0000">*</font></dd></dl>';
		            html+='<dl class="fixed" style="overflow:hidden">'; 
		            html+='<dd><label>规格：</label><input type="text" class="iput_t w200"  name="prdSpec"  id="prdSpec" value="'+entity.prdSpec+'"   onblur="checkTypeIsOk(this);"><font color="#FF0000">*</font></dd></dl></div>';
		            html+='<div id="commonGoods"><dl class="fixed" style="overflow:hidden">';
		            html+='<dd class="w600"><label>商品照片：</label><div class="upload_box" style=" width:385px !important">';
		            html+='<input type="hidden" id="fkPicFile"    name="fkPicFile"  value='+entity.fkPicFile+'  class="iput_t fl">';
		            html+='<input type="hidden" id="disDesc"  value=""  name="disDesc"  class="iput_t fl">';
		            html+='<input type="text" id="PicFile"  value=""  name="PicFile"  class="iput_t fl">';
		            html+='<span id="ui-upload-holder fr"><input type="button" class="btn" value="浏览" id="ui-upload-txt">';
		            html+=' <input type="file" id="ui-upload-input" name="file" style="width:385px !important"  onchange="PicFile.value = this.value;"></span></div></dd></dl>';
		          	//商品图片处理
		            html+='<div class="invo_img"><img width="176" height="176" src="${basePath}common/getImageByAttfile.shtml?attfileId='+entity.fkPicFile+'&random=' + Math.random() + '"></div>';
		            html+='<dl class="fixed" style="overflow:hidden">';
		            html+='<dd><label>最低库存量：</label><input type="text" class="iput_t w200"   name="minStorage"  onblur="checkIsNumber(this);"  id="minStorage" value='+entity.minStorage+'><font color="#FF0000">*</font></dd></dl></div>';
				}else if(resverseType=="10"){
					var actionFmt="'yyyy/MM/dd'";
					html+='<div id="kcsp"><dl class="fixed" style="overflow:hidden">';
					html+='<dd><label>次数：</label> <input type="text"  name="cnt" id="cnt" value='+entity.cnt+' class="iput_t w200">';
					html+='<font color="#FF0000">*</font></dd></dl>';
					html+='<dl class="fixed"  style="overflow:hidden"><dd><label>有效时间：</label>';
					html+='<input type="text"   id="startTime" class="Wdate iput_t w90"  name="startTime"  value='+entity.actStartTime+' onclick="WdatePicker({dateFmt:'+actionFmt+',isShowWeek:true,isShowClear:true,readOnly:true})">';
					html+='至<input type="text" id="d13" class="Wdate iput_t w90" name="endTime" value='+entity.actEndTime+'  onclick="WdatePicker({dateFmt:'+actionFmt+',isShowWeek:true,isShowClear:true,readOnly:true})" >';
	                html+='</dd></dl></div>';
				}else if(resverseType=="20"){
					html+='<div id="unitAndRule"><dl class="fixed" style="overflow:hidden">';
					html+='<dd><label>计量单位：</label>';
					html+='<div class="uboxstyle">';
					var unitHtml="";
					if(cateId2==""){
						unitHtml+='<option selected="selected" floatFlag="1"></option>';
						$(unit).each(function(id,item){
							 unitHtml+='<option value='+item.pkPrdunitId+'  floatFlag="'+item.floatFlag+'">'+item.unitName+'</option>';
						});
					}else{
						$(unit).each(function(id,item){
							if(entity.fkPrdunitId==item.pkPrdunitId){
								unitHtml+='<option value='+item.pkPrdunitId+' selected="selected"  floatFlag="'+item.floatFlag+'">'+item.unitName+'</option>';
							}else{
								unitHtml+='<option value='+item.pkPrdunitId+'  floatFlag="'+item.floatFlag+'">'+item.unitName+'</option>';
							}
						});
					}
					html+='<select  name="unitId" id="unitId">'+unitHtml+'</select>';
					html+='</div><font color="#FF0000">*</font></dd></dl>';
		            html+='<dl class="fixed" style="overflow:hidden">'; 
		            html+='<dd><label>规格：</label><input type="text" class="iput_t w200"  name="prdSpec"  id="prdSpec" value='+entity.prdSpec+'   onblur="checkTypeIsOk(this);"><font color="#FF0000">*</font></dd></dl></div>';
				}
				$("#dynamic").html(html);
				//刷新select
				refreshSelect();
		}
		function zTreeOnClick(event, treeId, treeNode) {
			var tid=treeNode.id ;
			resverseType=treeNode.resverseType;
			var title=treeNode.name;
			//为左边的商品分类的文本框赋值
			$("#cateName").val(title);
			$("#fkPrdcateId").val(tid);
		};
	/*得到商品分类的数据信息*/
	/* function   getTreeData(){
				$.ajax({
						url:"${basePath}scmInvocing/productInfo/findCategoryList.shtml",
						dataType:"json",
						type:"post",
	      	 			async:false,
	      	 			error : function(XMLHttpRequest) {
	      	 				ajaxError(XMLHttpRequest);
	      	 			},
	      	 			success:function(result){
	      	 				var node;
	      	 				$(result).each(function(id,item){
	      	 					if(id==0){
		      	 					node={id:item.pkPrdcateId,pId:item.fkParPrdcateId,name:item.cateName,open:true,resverseType:item.resverseType,resverseType:item.resverseType}; 
	      	 					}else{
		      	 					node={id:item.pkPrdcateId,pId:item.fkParPrdcateId,name:item.cateName,resverseType:item.resverseType,resverseType:item.resverseType};
	      	 					}
	      	 					treeNodes.push(node);
	      	 				});
	      	 			}
					
				});
	} */
	
	//保存
	function save(){
		var isTrue=checkForm(resverseType);
		if(isTrue==false){
			return;
		}
		//上传照片
		if(resverseType=="6"){
			/* $.ajaxFileUpload({
				url:'${basePath}membership/single/uploadFete.shtml',
				secureuri:false,                       //是否启用安全提交,默认为false 
				fileElementId:'feteFile',           //文件选择框的id属性
				dataType:'text',                       //服务器返回的格式,可以是json或xml等
				success:function(data){        //服务器响应成功时的处理函数
					if (data != "") {
						alertInfo("宴请单上传成功。");
						$("#fkFeteFile").val(data);
						$('#popFete').window('close');
					} else {
						alertErrro('上传失败，请重试！');
					}
				},
				error:function(data, status, e){ //服务器响应失败时的处理函数
					alertErrro('上传失败，请重试！');
				}
			}); */
		}
		$("input:[name='resverseType']").val(resverseType);
		var  param=$("#product").serialize();
		$.ajax({
			url:"${basePath}scmInvocing/productInfo/addProduct.shtml",
			data:param,
			type:"post",
			dataType:"text",
			async:true,
			error : function(XMLHttpRequest) {
	 				ajaxError(XMLHttpRequest);
	 			},
			success:function(result){
				if(result=="success"){
					alertInfo($common_create_success);
					window.location.href="${basePath}scmInvocing/productInfo/forwardToProductInfo.shtml";
				}
			}
		});
	}
	//跳转到商品列表中
	function forwardToList(){
				window.location.href="${basePath}scmInvocing/productInfo/forwardToProductInfo.shtml";
	}
	function checkForm(resverseType){
		var prdName=$("#prdName").val();
		if(checkIsNull(prdName)){
			alertWarning("商品名称不允许为空");
			return false;
		}
		//根据商品类型赋值
		if(resverseType=="1"){
		 	$("#chdCnt").val($("input:[name='TchdCnt']:checked").val());
			$("#guaCnt").val($("input:[name='TguaCnt']:checked").val());
		}else if(resverseType=="2"){//会籍
			$("#month").val($("input:[name='Tmonth']:checked").val());
			$("#weekday").val($("input:[name='Tweekday']:checked").val());
			$("#guaCnt").val($("input:[name='HguaCnt']:checked").val());

		}else if(resverseType=="6"||resverseType=="20" ){//普通商品
			//商品单位Id
			$("#fkPrdunitId").val($("#unitId").val());
			
		}else if(resverseType=="3"){//派队商品
			$("#weekday").val($("input:[name='partWeekday']:checked").val());
			$("#hours").val($("input:[name='PaiHours']:checked").val());
			$("#incFood").val($("input:[name='isFood']:checked").val());
		}else if(resverseType=="4"){//团体
			$("#weekday").val($("input:[name='partWeekday']:checked").val());
			$("#hours").val($("input:[name='TeamHours']:checked").val());
			$("#incFood").val($("input:[name='isFood']:checked").val());
		}else if(resverseType=="6"||resverseType=="7"||resverseType=="8"||
			resverseType=="9"||resverseType=="11"||resverseType=="12"||resverseType=="13"||resverseType=="61"){
			var val=$("#prdSpec").val();
			$("#fkPrdunitId").val($("#unitId").val());
			if(checkIsNull(val)){
				alertWarning("商品规格不允许为空!");
				return false;
			}else{
				 return validatePrdSpec();
			}
			var minStorage=$("#minStorage").val();
			if(checkIsNull(minStorage)){
				alertWarning("库存数量不允许为空!!");
				return false;
			}
			if(!validateIsNumber(minStorage)){
				alertWarning("库存数量必须为数字!");
				return false;
			}
		}
		return true;
	}
	//验证数字
	function validateIsNumber(val){
		var reg=new RegExp("^[0-9]*$");
		if(reg.test(val)){
			return true;
		}else{
			return false;
		}
		
	}
	//验证数字
	function checkIsNumber(obj){
		var value=$(obj).val();
		if(!validateIsNumber(value)){
			alertWarning("该项必须为数字");
			$(obj).val("");
			$(obj).focus();
			return;
		}
	}
	function checkIsNull(val){
		if(val==""||$.trim(val)==""){
			return true;
		}
		return false;
	}
	/*修改商品*/
	function updateProduct(){
		var isOk=checkForm(resverseType);
		if(!isOk){
			return;
		}
		if(resverseType=="6" ||resverseType=="7"||resverseType=="8"||resverseType=="9"
			||resverseType=="11"||resverseType=="12"||resverseType=="13"){
			var PicFile=$("#PicFile").val();
			if(!checkIsNull(PicFile)){
					$.ajaxFileUpload({
						url:'${basePath}scmInvocing/productInfo/uploadImage.shtml',
						secureuri:false,                       //是否启用安全提交,默认为false 
						fileElementId:'ui-upload-input',//文件选择框的id属性
						dataType:'text',                       //服务器返回的格式,可以是json或xml等
						success:function(data){        //服务器响应成功时的处理函数
							if(data=="failure"){
								alertWarning("上传失败，请重新上传，选择符合要求的图片");
								return ;
							}else{
								$("#disDesc").val(data);//文件路径
								$.ajax({
									url:"${basePath}scmInvocing/productInfo/updateProduct.shtml",
									data:$("#updateProduct").serialize(),
									type:"post",
									dataType:"text",
									async:true,
									error : function(XMLHttpRequest) {
				      	 				ajaxError(XMLHttpRequest);
				      	 			},
									success:function(result){
										if(result=="success"){
											window.location.href="${basePath}scmInvocing/productInfo/forwardToProductInfo.shtml";
										}
									}
								});
							}
						},
						error:function(data, status, e){ //服务器响应失败时的处理函数
							alertErrro('上传失败，请重试！');
							return ;
						}
					});
				}else{
					$.ajax({
						url:"${basePath}scmInvocing/productInfo/updateProduct.shtml",
						data:$("#updateProduct").serialize(),
						type:"post",
						dataType:"text",
						async:true,
						error : function(XMLHttpRequest) {
	      	 				ajaxError(XMLHttpRequest);
	      	 			},
						success:function(result){
							if(result=="success"){
								window.location.href="${basePath}scmInvocing/productInfo/forwardToProductInfo.shtml";
							}
						}
					});
				}
		}
		//无需上传
		else{
		//
				$.ajax({
					url:"${basePath}scmInvocing/productInfo/updateProduct.shtml",
					data:$("#updateProduct").serialize(),
					type:"post",
					dataType:"text",
					async:true,
					error : function(XMLHttpRequest) {
      	 				ajaxError(XMLHttpRequest);
      	 			},
					success:function(result){
						if(result=="success"){
							window.location.href="${basePath}scmInvocing/productInfo/forwardToProductInfo.shtml";
						}
					}
				});
		}
	}
	function validatePrdSpec(){
		var  floatFlag=$("#unitId").find("option:selected").attr("floatFlag");
		var val=$("#prdSpec").val();
		if(floatFlag!="1"){
		  if(val.indexOf(".")>-1){
			  alertWarning("该商品的商品规格不允许包含小数!");
			  return false;
		  }
		}
		return true;
	}	
	function  checkTypeIsOk(obj){
		var  floatFlag=$("#unitId").find("option:selected").attr("floatFlag");
		var val=$(obj).val();
		if(floatFlag!="1"){
			if(val.indexOf(".")>-1){
				  alertWarning("该商品的商品规格不允许包含小数!");
				  $(obj).val("");
			}
		}
	}
	</SCRIPT>
</head>
<body class="bg">
<div class="content m_auto">
	<div class="content_l mt10">
    	<ul>
    		<shiro:hasPermission name="scmInvocing/productInfo/forwardToProductInfo.shtml">
    				  <li  class="content_hover"><a href="${basePath}scmInvocing/productInfo/forwardToProductInfo.shtml"><i class="nav_icon_b"></i><br>商品信息</a></li>
    		</shiro:hasPermission>
    		 <shiro:hasPermission name="scmInvocing/countUnit/forwardToUnitInfo.shtml">
    		 		<li><a href="${basePath}scmInvocing/countUnit/forwardToUnitInfo.shtml"><i class="nav_icon_b"></i><br>单位设置</a></li>
    		 </shiro:hasPermission>
    		 <shiro:hasPermission name="scmInvocing/supplier/forwardToSupply.shtml">
    		 		   <li><a href="${basePath}scmInvocing/supplier/forwardToSupply.shtml"><i class="nav_icon_a"></i><br>供应商信息</a></li>
    		 </shiro:hasPermission>
    		  <shiro:hasPermission name="scmInvocing/priceManager/forwardToList.shtml">
    		 		  <li><a href="${basePath}scmInvocing/priceManager/forwardToList.shtml"><i class="nav_icon_f"></i><br>价格管理</a></li>
    		 </shiro:hasPermission>
    		   <shiro:hasPermission name="scmInvocing/scmPurOrder/findInvoPurOrder.shtml">
            	  <li><a href="${basePath}scmInvocing/scmPurOrder/findInvoPurOrder.shtml"><i class="nav_icon_b"></i><br>采购订单</a></li>
    		 </shiro:hasPermission>
    		   <shiro:hasPermission name="scmInvocing/scmPayForm/findInvoOrderPay.shtml">
           		   <li><a href="${basePath}scmInvocing/scmPayForm/findInvoOrderPay.shtml"><i class="nav_icon_b"></i><br>付款申请</a></li>
    		 </shiro:hasPermission>
   </ul>

    </div>
    <div class="content_r mt10">
    	<div class="p20">
    	
       
        <div class="tab_normal mt10">
           
            <ul class=" fixed" id="tab_a"></ul>
           <!--  <div class="payment_l tc">
            	 
                  <div style="overflow-y: auto;width: 159px; height: 412px;display:none;"  class="ztree" id="sptree">
                   
                </div>
            </div> -->
            <form id="updateProduct" method="post" >
            <input type="hidden" name="resverseType" id="resverseType" value="${entity.resverseType}"/>
            <input type="hidden" name="pkPrdId"  id="pkPrdId" value="${entity.pkPrdId}">
            <input type="hidden"   id="cateId2" value="${entity.cateId2}">
            <input type="hidden" name="weekday"  id="weekday" value=""/>
            <input type="hidden" name="month"  id="month" value=""/>
             <input type="hidden" name="hours"  id="hours" value=""/>
            <input type="hidden" name="chdCnt" id="chdCnt" value=""/>
            <input type="hidden" name="guaCnt" id="guaCnt" value=""/>
             <input type="hidden" name="incFood" id="incFood" value=""/>
            <input type="hidden" name="fkPrdcateId" id="fkPrdcateId" value=""/>
            <input type="hidden" name="fkPrdunitId" id="fkPrdunitId" value=""/>
          	<ul class="fixed" id="tab_conbox_a">
                <li class="p10 pr" style="margin-left:300px">
                	 <div class="file_single_dl_x f14 fixed">
        	<dl class="fixed" style="overflow:hidden">
            	<dd><label>商品编号：</label><input type="text" class="iput_t w200"  name="pkPrdId"   id="prdId"  disabled="disabled"></dd>
            </dl>
             <dl class="fixed" style="overflow:hidden">
            	<dd><label>商品名称：</label><input type="text" class="iput_t w200"  name="prdName"   id="prdName"><font color="#FF0000">*</font>商品名称、规格、单位三个属性确定商品的唯一性
				</dd>
            </dl>
             <dl class="fixed" style="overflow:hidden">
            		<dd><label>商品分类：</label><input type="text" class="iput_t w200"  name="cateName"  id="cateName" disabled="disabled">
					</dd>
            </dl>
			<!-- 显示动态商品结果 -->
			<div id="dynamic">
			
			
			</div>
            <dl class="fixed"  >
            	<dd><label>备注：</label><textarea class="textare w200"  rows="5" cols="35" name="comments" id="comments"></textarea></dd>
            </dl>
        </div>
                    
                    <div class="page fr m10">
                    	<div class="btm_btn mt10">
                            <dl>
                               <dd><input class="btn" type="button" onclick="updateProduct();" value="保存"></dd>
                                <dd><input class="btn" type="button" onclick="forwardToList();" value="返回"></dd> 
                                 <dd style="width:400px">&nbsp;</dd>
                            </dl>
                        </div>
                    	
                      
                    </div>
                    <!----->
                </li>
                </ul>
                </form>
                </div>
        </div>
    </div>
</div>
<script>
	                 /*    document.getElementById("ui-upload-input").onchange=function(){
	                    document.getElementById("fkPicFile").value = this.value;
	                    } */
     </script>
<!---弹出层 成员信息编w辑--->
<div id="addfl" class="easyui-window" title="新增分类" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:400px; height:150px;position:relative;">
	<div class="editor_h1 fixed">
      <div class="editor fl">
            <ul>
                <li><label>分类名称：</label><input type="text" class="iput_t w160"></li>
            </ul>
        </div>
    </div>
    <div class="btm_btn btm_bg">
    	<dl>
        	<dd><input type="button" class="btn" onclick="$('#addfl').window('close')" value="确定"></dd>
            <dd><input type="button" class="btn" onclick="$('#addfl').window('close')" value="取消"></dd>
        </dl>
    </div>	 
</div>

</body>
</html>

